using System;

namespace ThridGroup.ERP.Application.Contracts.DTO.Common
{
    /// <summary>
    /// 分页排序输入DTO基类
    /// </summary>
    public class PagedAndSortedInputDto
    {
        /// <summary>
        /// 页码，从1开始
        /// </summary>
        public int PageIndex { get; set; } = 1;

        /// <summary>
        /// 每页大小
        /// </summary>
        public int PageSize { get; set; } = 10;

        /// <summary>
        /// 排序字段
        /// </summary>
        public string Sorting { get; set; } = string.Empty;

        /// <summary>
        /// 跳过的记录数
        /// </summary>
        public int SkipCount => (PageIndex - 1) * PageSize;

        /// <summary>
        /// 最大获取数量
        /// </summary>
        public int MaxResultCount => PageSize;
    }
} 